package sctu.edu.java.year2016.team03.maoyuhao.day20160521.chapter4_2;

/**
 * * 编写Java程序，应用for循环打印菱形
 * Created by cc on 2016/5/21.
 */
public class Wrok {
    public static void main(String[] args) {
        for (int i=1;i<3;i+=1) {
            for (int a=3;a>i-1;a--) {
                System.out.print(" ");
            }
            for (int b=1;b<=i; b++) {
                System.out.print("* ");
            }
            System.out.println();
        }
        for (int j=1; j<4;j+=1) {
            for (int c=1;c<j+1;c++) {
                System.out.print(" ");
            }
            for (int d=3;d>=j;d--) {
                System.out.print("* ");
            }
            System.out.println();
        }
    }
}